<template>
  <div class="appoint-details-dialog">
    <el-dialog :visible.sync="dialogVisible" :before-close="handleClose" width="750px">
      <div class="title" slot="title">项目预约详情</div>
      <div class="member-deposit-content">
        <div class="content-item">
          <div><span class="s1">持卡人姓名：</span><span>李光辉</span></div>
          <div><span class="s1">手机号码：</span><span>17899879999</span></div>
        </div>
        <div class="content-item">
          <div><span class="s1">套餐名称：</span><span>正骨塑形套餐</span></div>
          <div><span class="s1">使用日期：</span><span>2021-03-19</span></div>
        </div>
        <div class="content-item">
          <div><span class="s1">套餐价格：</span>
            <span style="text-decoration: line-through">￥3000.00</span>
            <span style="color: #FF6F35;">￥1960.00</span></div>
        </div>
        <div class="content-table">
          <el-table :data="projectList" border header-cell-class-name="content-table-title">
            <el-table-column type="index"/>
            <el-table-column prop="name" label="项目名称"/>
            <el-table-column prop="num" label="数量"/>
            <el-table-column prop="execNum" label="执行数量"/>
            <el-table-column prop="remaining" label="剩余数量"/>
          </el-table>
        </div>
      </div>
      <div class="btn">
        <el-button @click="dialogVisible = false" type="primary">关闭</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: 'appointDetails',
  data () {
    return {
      dialogVisible: false,
      projectList: [
        { name: '盆骨正骨', num: '10次', execNum: '1次', remaining: '9次' },
        { name: '盆骨正骨', num: '10次', execNum: '1次', remaining: '9次' },
        { name: '盆骨正骨', num: '10次', execNum: '1次', remaining: '9次' },
        { name: '盆骨正骨', num: '10次', execNum: '1次', remaining: '9次' },
        { name: '盆骨正骨', num: '10次', execNum: '1次', remaining: '9次' }
      ]
    }
  },
  methods: {
    show () {
      this.dialogVisible = true
    },
    handleClose () {
      this.dialogVisible = false

      const a = 1; const b = 2; const c = 3
      console.log(a + b + c)
    }
  }
}
</script>

<style scoped lang="scss">
.appoint-details-dialog {
  .title {
    border-bottom: 1px solid #e5e1e1;
    padding-bottom: 10px;
    font-size: 16px;
  }
  .member-deposit-content {
    margin-top: -30px;
    .content-title {
      margin-top: 15px;
      color: rgba(0, 0, 0, 0.85);
    }
    .content-item {
      display: flex;
      align-items: center;
      margin: 25px 40px;
      div {
        width: 50%;
      }
      .s1 {
        color: rgba(0, 0, 0, 0.45);
        width: 100px;
        display: inline-block;
        text-align: right;
      }
      .s2 {
        margin-left: 20px;
      }
    }
    .content-table{
      width: 90%;
      margin: 0 auto;
    }
  }
  .btn {
    display: flex;
    justify-content: center;
    margin-top: 20px;
  }
}
</style>
